import request from '@/config/axios'

// 订单限制数量 VO
export interface GlobeVO {
  id: number // 订单项编号
  orderNumber: number // 订单限制数量
  orderDelectSteat: number // 是否清除表单信息(0否 1是)
}

// 订单限制数量 API
export const GlobeApi = {
  // 查询订单限制数量分页
  getOrderQuantityPage: async (params: any) => {
    return await request.get({ url: `/trade/order-quantity/page`, params })
  },

  // 查询订单限制数量详情
  getOrderQuantity: async (id: number) => {
    return await request.get({ url: `/trade/order-quantity/get?id=` + id })
  },

  // 新增订单限制数量
  createOrderQuantity: async (data: OrderQuantityVO) => {
    return await request.post({ url: `/trade/order-quantity/create`, data })
  },

  // 修改订单限制数量
  updateOrderQuantity: async (data: OrderQuantityVO) => {
    return await request.put({ url: `/trade/order-quantity/update`, data })
  },

  // 删除订单限制数量
  deleteOrderQuantity: async (id: number) => {
    return await request.delete({ url: `/trade/order-quantity/delete?id=` + id })
  },

  // 导出订单限制数量 Excel
  exportOrderQuantity: async (params) => {
    return await request.download({ url: `/trade/order-quantity/export-excel`, params })
  },
}
